<html>
<head><meta charset="utf-8"><title>nested associated type bounds · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html">nested associated type bounds</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="154140988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/nested%20associated%20type%20bounds/near/154140988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html#154140988">(Jan 01 2019 at 20:01)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> isn't there something in the pipes for nesting associated type syntax? e.g. <code>Foo::Bar::Baz: Clone</code></p>



<a name="154146163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/nested%20associated%20type%20bounds/near/154146163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html#154146163">(Jan 01 2019 at 22:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span>  not that I'm aware; there is <code>MyTrait&lt;Assoc: Bound&gt;</code> planned tho</p>



<a name="154147999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/nested%20associated%20type%20bounds/near/154147999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html#154147999">(Jan 01 2019 at 23:53)</a>:</h4>
<p>Ah, maybe that's what I'm thinking of. Is that an RFC I can poke at?</p>



<a name="154148006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/nested%20associated%20type%20bounds/near/154148006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html#154148006">(Jan 01 2019 at 23:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span>  here: <a href="https://github.com/rust-lang/rfcs/pull/2289" target="_blank" title="https://github.com/rust-lang/rfcs/pull/2289">https://github.com/rust-lang/rfcs/pull/2289</a> -- I believe <span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> has started implementing it <span class="emoji emoji-1f642" title="slight smile">:slight_smile:</span></p>



<a name="154148440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/nested%20associated%20type%20bounds/near/154148440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html#154148440">(Jan 02 2019 at 00:08)</a>:</h4>
<p>Does this help with the nested case at all (beyond the one step)?</p>



<a name="154148445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/nested%20associated%20type%20bounds/near/154148445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html#154148445">(Jan 02 2019 at 00:09)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span>  yes in the sense that you can write <code>Foo: Bar&lt;Baz: Quux&lt;Wibble: Wobble&gt;&gt;</code></p>



<a name="154151878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/nested%20associated%20type%20bounds/near/154151878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html#154151878">(Jan 02 2019 at 02:07)</a>:</h4>
<p>And that should work in any trait bound position, yeah? Like</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Note</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">FieldsIter</span>: <span class="nb">Iterator</span><span class="o">&lt;</span><span class="n">Item</span>: <span class="nb">AsRef</span><span class="o">&lt;</span><span class="kt">str</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="154151940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/nested%20associated%20type%20bounds/near/154151940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html#154151940">(Jan 02 2019 at 02:09)</a>:</h4>
<p>And do you think the RFC should supersede <a href="https://github.com/rust-lang/rust/issues/38078" target="_blank" title="https://github.com/rust-lang/rust/issues/38078">https://github.com/rust-lang/rust/issues/38078</a> ?</p>



<a name="154173483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/nested%20associated%20type%20bounds/near/154173483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html#154173483">(Jan 02 2019 at 12:57)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> <br>
That's an orthogonal issue.</p>



<a name="154181156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/nested%20associated%20type%20bounds/near/154181156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html#154181156">(Jan 02 2019 at 15:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> sure, that should work</p>



<a name="154187866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/nested%20associated%20type%20bounds/near/154187866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/nested.20associated.20type.20bounds.html#154187866">(Jan 02 2019 at 17:23)</a>:</h4>
<blockquote>
<p>That's an orthogonal issue.</p>
</blockquote>
<p>I was thinking it might be different, but figured I'd let y'all with more context decide ;-)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>